package main

import "fmt"

func main() {
	array := [5]int{1, 2, 3, 4, 5}

	fmt.Println(array)
	reverse2(&array)
	fmt.Println(array)
}
func reverse2(array *[5]int) {
	for i, j := 0, 4; i < j; i, j = i+1, j-1 {
		array[i], array[j] = array[j], array[i]
	}
}
